package com.interview.ujiuye5;

interface MyFun {
    default String getName(){
        return "哈哈哈";
    }
}
class MyClass {

    public String getName(){
        return "嘿嘿嘿";
    }

}
class SubClass extends MyClass implements MyFun{

}

interface MyInterface {
    default String getName(){
        return "呵呵呵";
    }
    public static void show(){
        System.out.println("接口中的静态方法");
    }
}
class SubClass2 implements MyFun,MyInterface{

    @Override
    public String getName() {
        return MyInterface.super.getName();
    }
}
public class TestInterface {
    public static void main(String[] args) {
        SubClass subClass = new SubClass();
        System.out.println(subClass.getName());//输出什么
        SubClass2 subClass2 = new SubClass2();
        System.out.println(subClass2.getName());
        MyInterface.show();//静态方法直接调用
    }
}
